package in.muton.edushare.pages.user;

import in.muton.edushare.EduShareSession;
import in.muton.edushare.components.calendar.CalendarPanel;

import org.apache.wicket.PageParameters;

import com.edushare.common.constants.ApplicationConstants;

public class UserCalendar extends UserBase {

	public UserCalendar(PageParameters params) {
		super(params);
		int month = params.getAsInteger("1", -1);
		int year = params.getAsInteger("2", -1);
		add(p = new CalendarPanel("calendarPanel", getModel().getObject(),
				this, month, year));
	}

	@Override
	public String getActivePage() {
		return "UserCalendar";
	}

	@Override
	public String getPageTitle() {
		return getModel().getObject().getCompleteUserName() + " | Calendar | "
				+ p.getMonth() + " | " + ApplicationConstants.APPLICATION_NAME;
	}

	@Override
	public String getUserRole() {
		if (EduShareSession.get().getLoggedInUser() == getModel().getObject())
			return " : Home";
		else
			return "";
	}

	CalendarPanel p;
}
